<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <script src="../axios.js"></script>
  <script>
    axios.post('http://127.0.0.1:3000/axios', {
      uname: 'lisi',
      pwd: 123456
    }).then((data) => {
      const { data: res } = data
      console.log(res);
    })

    axios.put('http://127.0.0.1:3000/axios/1', {
      uname: 'lisi',
      pwd: 123456
    }).then((data) => {
      const { data: res } = data
      console.log(res);
    })

    let params = new URLSearchParams()
    params.append('uname', 'sw')
    params.append('pwd', 3343433)

    axios.post('http://127.0.0.1:3000/axios', params).then((data) => {
      const { data: res } = data
      console.log(res);
    })
  </script>
</body>

</html>